﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace Sotipha.Web.Views.Partner
{
    public partial class Default : CPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            CPartnerUI UI = new CPartnerUI();
            ltrPartnerList.Text = UI.GetList();

            string lblCompamy = "Company";
            string lblPhone = "Phone";
            string lblAddress = "Address";
            if (Session["lang"].ToString() == "vi")
            {
                ltrPartner.Text = "Đối tác";
                lblCompamy = "Công ty";
                lblPhone = "Điện thoại";
                lblAddress = "Địa chỉ";
            }

            StringBuilder scriptServerConfig = new StringBuilder();
            scriptServerConfig.AppendFormat("var lblCompamy='{0}';\n", lblCompamy);
            scriptServerConfig.AppendFormat("var lblPhone='{0}';\n", lblPhone);
            scriptServerConfig.AppendFormat("var lblAddress='{0}';\n", lblAddress);
            Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "ServerConfig",
                                            scriptServerConfig.ToString(), true);
        }
    }
}